<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>案例-走马灯</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        li {
            list-style: none;
        }

        img {
            width: 200px;
        }

        .box {
            width: 600px;
            height: 112px;
            border: 5px solid #000;
            margin: 100px auto;
            overflow: hidden;
        }

        ul {
            display: flex;
            animation: an1 6s linear infinite;
        }
        .box:hover ul {
            animation-play-state: paused;
            cursor: pointer;
        }

        @keyframes an1 {
            0% {
                transform: translate(0);
            }
            100% {
                transform: translate(-1200px);
            }
        }


    </style>
</head>
<body>
<div class="box">
    <ul>
        <li><img src="./images/1.jpg" alt=""/></li>
        <li><img src="./images/2.jpg" alt=""/></li>
        <li><img src="./images/3.jpg" alt=""/></li>
        <li><img src="./images/4.jpg" alt=""/></li>
        <li><img src="./images/6.jpg" alt=""/></li>
        <li><img src="./images/7.jpg" alt=""/></li>
        <li><img src="./images/1.jpg" alt=""/></li>
        <li><img src="./images/2.jpg" alt=""/></li>
        <li><img src="./images/3.jpg" alt=""/></li>
    </ul>
</div>
</body>
</html>
